package cn.xuan.zp.web.page;

import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;

@Controller
@RequestMapping("/page")
public class PageController {

    @RequestMapping("/home")
    public String home(){
        return "index";
    }

    @RequestMapping("/nav/{index}")
    public String nav(@PathVariable("index") String index){
        if("1".equals(index)){
            return "index";
        }else if("2".equals(index)){
            return "types";
        }else if("3".equals(index)){
            return "tags";
        }else if("4".equals(index)){
            return "archives";
        }else if("5".equals(index)){
            return "about";
        }else if("6".equals(index)){
            return "user/blogs";
        }else if("7".equals(index)){
            return "user/blogs-input";
        }else if("8".equals(index)){
            return "user/blogs-show";
        }

       /* <a href="#" class="active m-item item m-mobile-hide"><i class="home icon"></i>首页</a>
            <a href="#" class="m-item item m-mobile-hide"><i class="idea icon"></i>分类</a>
            <a href="#" class="m-item item m-mobile-hide"><i class="tags icon"></i>标签</a>
            <a href="#" class="m-item item m-mobile-hide"><i class="clone icon"></i>归档</a>
            <a href="#" class="m-item item m-mobile-hide"><i class="info icon"></i>关于我</a>*/
        return "index";
    }
}
